package com.TestDemo.Test1;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zjz
 * @Date: 2021/10/25/19:43
 * @Description:
 * @Target:
 */
public class 凸凹Test {


    public static void printAllFolds(int N) {
        printProcess(1, N, true);
    }

    public static void printProcess(int i, int N, boolean down) {
        if (i > N) {
            return;
        }
        printProcess(i + 1, N, true);   // N为3时,进来2,先打印3的凹,然return,然后打印2的凹
        System.out.println(down ? "凹 " : "凸 ");
        printProcess(i + 1, N, false);
    }

    public static void main(String[] args) {
        int N = 3;
        printAllFolds(N);
    }


}
